export default {
    bind(el, binding) {
        const { value } = binding; // 
        const permissions = ['edit', 'delete', 'add']  //获取实际的按钮权限
        if (value && Array.isArray(value)) {
            const hasPermission = value.some((permission) => permissions.includes(permission));
            if (!hasPermission) {
                el.style.display = 'none';
            }
            // else {
            //     el.style.display = '';
            // }
        } else {
            console.error('v-permission 指令需要传入一个权限数组');
        }
    }
}
